﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<style type="text/css">
    #orderTable
    {
        border:1px solid #0073EA;
        }
    #orderTable th
    {
        height:50px;
        text-align:center;
        vertical-align:middle;
        }
        #orderTable td
    {
        text-align:center;
        vertical-align:middle;
        padding:10px;
        }
</style>
<script>
    $(function () {
        $("button, input:submit,input:text,.details").button();

    });
	</script>
<table id="orderTable"  border="1px solid #0073EA" cellpadding="1" cellspacing="1"   width="100%">
		<tr class="ui-state-hover">
			<th  valign="top" style="text-align: center;">Ngày Mua</th>
			<th  valign="top" style="text-align: center;">Ghế mua</th>
            <th  valign="top" style="text-align: center;">Nhà Xe</th>
            <th  valign="top" style="text-align: center;">Xe đi</th>
            <th  valign="top" style="text-align: center;">Trạng thái</th>
		</tr>
       
        <% foreach (var item in (List<ASPNETMVCApplication.Areas.Cust.ViewModels.OrderViewModels>)ViewData["listOrderNew"])
           {
                %>
                <tr>
		            <td><%: item._order.OrderDate %></td>
		            <td valign="top">Ghế :<% foreach (var proc in item._listOrderDetail)
                                  {
                                    %>
                                    <b><%: proc.ProductName %>,</b>
                                    <%   
                                  }
                    %></td>
		            <td><%: item._supplier.CompanyName %><b>Liên hệ :<%:item._supplier.Mobilephone %></b></td>
		            <td><%: item._traffic.TrafficName%></td>
		            <td><% if (item._order.Status == 0)
                     {
                         %>
                         <a class="details">Chưa thanh toán</a>
                        <%
                            }
                     else
                     {
                         %>
                         <a class="details">Chưa thanh toán</a>
                         <% 
                     }
                    
                %>
                     </td>
	            </tr>
                <% 
           } 
        %>
	</table>